﻿CREATE FUNCTION [audit].[GetTraceComparisonOperatorNo]
(@Operator CHAR (8))
RETURNS INT
AS
BEGIN
	DECLARE @ReturnValue int

	SELECT @ReturnValue = (
		CASE @Operator
			WHEN '=' THEN 0
			WHEN '<>' THEN 1
			WHEN '>' THEN 2
			WHEN '<' THEN 3
			WHEN '>=' THEN 4
			WHEN '<=' THEN 5
			WHEN 'LIKE' THEN 6
			WHEN 'NOT LIKE' THEN 7
		END
	)

	RETURN(@ReturnValue)
END